UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bcuIBiAUTwpLyUZ22N0tva8bmOJU/6iA2b9C3rQ2G4c='
WHERE
key_id = 'a88c998e84cd120d4c374e9795d048b30859662b7f6cbad0f26d0c4e206a446b'
AND (
token = 'bcuIBiAUTwpLyUZ22N0tva8bmOJU/6iA2b9C3rQ2G4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)