UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1jOeVTqjVR7lBfyjSdbO/u+1pcAItETAUsUDFe0ov5A='
WHERE
key_id = '2863add0a7ed9148d93e8072a1e4e84ddce19f2abbdb7c21305875317ec74cce'
AND (
token = '1jOeVTqjVR7lBfyjSdbO/u+1pcAItETAUsUDFe0ov5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)