UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LbgDn7XhP1fCTq6LWXpiLRtxpx/b7Y9AGvYNrzay9b0='
WHERE
key_id = '2ef8260762103466f10f993e933f1db1b605a5113a9af2f56189a956453cee58'
AND (
token = 'LbgDn7XhP1fCTq6LWXpiLRtxpx/b7Y9AGvYNrzay9b0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)