UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LxurzFft5+ALS3rF4aNlCyyO7l2d69Vq/BVlSYPDdEk='
WHERE
key_id = '48a872770016b59ef8dad79ced6618397c8cc8af6a11e9d38c563d4eff4d00b9'
AND (
token = 'LxurzFft5+ALS3rF4aNlCyyO7l2d69Vq/BVlSYPDdEk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)