UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mOxB0Zbar6l/dXKlxtpiFtR2V71zHOwJ7vrGt18zJyw='
WHERE
key_id = '7bd12f8a85f611d224639ebc3292f74e180ab3af9a3824536e81107d77aef05b'
AND (
token = 'mOxB0Zbar6l/dXKlxtpiFtR2V71zHOwJ7vrGt18zJyw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)