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