UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L94JMDEZH1KR6s8Jnpa7hNbLtPa+PVSewCX8GkTiHKM='
WHERE
key_id = 'e674a93e2d0af27a57686120bcc9b81c25c3bae1d87412b6f157d157712dc10b'
AND (
token = 'L94JMDEZH1KR6s8Jnpa7hNbLtPa+PVSewCX8GkTiHKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)