UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vKMgxqI2Yr6Hxgf3cS8TMpyqfS3QWci55xGB7LmR78I='
WHERE
key_id = '7358850806f611a45166ab01b15643120fa850265ea6c2db24d645c42a448aaa'
AND (
token = 'vKMgxqI2Yr6Hxgf3cS8TMpyqfS3QWci55xGB7LmR78I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)