UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lGOjplQs59bYNAhQykdjctNSdl3wL0oMU6LnvvOKjhc='
WHERE
key_id = '4bc3816c90142bcd16900a399fce52a72c38b42650800bd86bcbce5c9aefa830'
AND (
token = 'lGOjplQs59bYNAhQykdjctNSdl3wL0oMU6LnvvOKjhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)